package com.chapter7.neibulei.demo11;


//基类：事件类
public class Event {
    //事件发起者
    private Object source;
    //事件描述
    private Object arg;

    //事件发生的时间
    private long time;

    public Event(Object source) {
        this(source,null);
    }

    public Event(Object source, Object arg) {
        this.source = source;
        this.arg = arg;
        this.time=System.nanoTime();
    }

    public Object getSource() {
        return source;
    }

    public Object getArg() {
        return arg;
    }

    public long getTime() {
        return time;
    }
}
